<%@ Control Language="C#" AutoEventWireup="true" CodeFile="PersonList.ascx.cs" Inherits="admin_PersonelList" %>

<table>
    <tr>
        <td style="width: 165px">
            <asp:Label ID="Label1" runat="server" Text="Enter name of people here:"></asp:Label></td>
        <td style="width: 100px">
            <asp:TextBox ID="txtSearch" runat="server"></asp:TextBox></td>
        <td style="width: 100px">
            <asp:LinkButton ID="lnkSearch" runat="server" CssClass="c_button" OnClick="lnkSearch_Click">Search</asp:LinkButton></td>
    </tr>
</table >
<asp:Panel ID="pnlEditBox" runat="server" Visible="false">
<table >
    <tr>
        <td style="width: 100px; height: 21px">
            <asp:Label ID="Label5" runat="server" Text="First name:"></asp:Label></td>
        <td style="width: 195px; height: 21px">
            <asp:TextBox ID="txtFirstName" runat="server"></asp:TextBox></td>
        <td style="width: 100px; height: 21px">
        </td>
    </tr>
    <tr>
        <td style="width: 100px">
            <asp:Label ID="Label6" runat="server" Text="Last name:"></asp:Label></td>
        <td style="width: 195px">
            <asp:TextBox ID="txtLastName" runat="server"></asp:TextBox></td>
        <td style="width: 100px">
        </td>
    </tr>
    <tr>
        <td style="width: 100px; height: 26px">
            <asp:Label ID="Label7" runat="server" Text="Date of birth:"></asp:Label></td>
        <td style="width: 195px; height: 26px">
            <input id="txtDateOfBirth" name="txtDateOfBirth" type="text" /></td>
        <td style="width: 100px; height: 26px">
        </td>
    </tr>
    <tr>
        <td style="width: 100px">
            <asp:Label ID="Label8" runat="server" Text="Gender:"></asp:Label></td>
        <td style="width: 195px">
            <asp:RadioButton ID="radMale" GroupName="Gender" runat="server" Text="Male" />
            <asp:RadioButton ID="radFemale" GroupName="Gender" runat="server" Text="Female" /></td>
        <td style="width: 100px">
        </td>
    </tr>
    <tr>
        <td style="width: 100px">
            <asp:Label ID="Label9" runat="server" Text="Email:"></asp:Label></td>
        <td style="width: 195px">
            <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox></td>
        <td style="width: 100px">
        </td>
    </tr>
    <tr>
        <td style="width: 100px">
            <asp:Label ID="Label10" runat="server" Text="Address:"></asp:Label></td>
        <td style="width: 195px">
            <asp:TextBox ID="txtAddress" runat="server"></asp:TextBox></td>
        <td style="width: 100px">
        </td>
    </tr>
    <tr>
        <td style="width: 100px">
        </td>
        <td style="width: 195px">
            <asp:LinkButton ID="lnkUpdate" runat="server" CssClass="c_button">Update</asp:LinkButton>
            <asp:LinkButton ID="lnkCancel" runat="server" CssClass="c_button" OnClick="lnkCancel_Click">Cancel</asp:LinkButton></td>
        <td style="width: 100px">
        </td>
    </tr>
    <tr>
        <td style="width: 100px">
        </td>
        <td style="width: 195px">
        </td>
        <td style="width: 100px">
        </td>
    </tr>
</table>
</asp:Panel>
<br />
<asp:GridView CssClass="list_table" ID="dgrPersonel"  runat="server" AutoGenerateColumns="False" OnRowCancelingEdit="dgrPersonel_RowCancelingEdit" OnRowEditing="dgrPersonel_RowEditing" DataKeyNames="ID" BorderColor="SteelBlue" BorderStyle="Solid" BorderWidth="1px">
    <Columns>
        <asp:TemplateField>
            <ItemTemplate>
                <asp:CheckBox ID="chkChoice" runat="server" />
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="First name">           
            <ItemTemplate>
                <asp:Label ID="Label1" runat="server" Text='<%# Bind("FirstName") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Last name">          
            <ItemTemplate>
                <asp:Label ID="Label2" runat="server" Text='<%# Bind("LastName") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Date of birth">          
            <ItemTemplate>
                <asp:Label ID="Label3" runat="server" Text='<%#Eval("DateOfBirth","{0:MM/dd/yyyy}") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Gender">            
            <ItemTemplate>
                <asp:Label ID="Label4" runat="server" Text='<%# Bind("Gender") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Email">         
            <ItemTemplate>
                <asp:Label ID="Label5" runat="server" Text='<%# Bind("Email") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Address">       
            <ItemTemplate>
                <asp:Label ID="Label6" runat="server" Text='<%# Bind("Address") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:CommandField ShowEditButton="True" EditText="Quick edit" />
        <asp:TemplateField>
            <ItemTemplate>
                <a href='Default.aspx?ctrl=person&mode=1&id=<%# Eval("ID") %>'>Edit</a>
          
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField>
            <ItemTemplate>
                <a href='Default.aspx?ctrl=user&per_id=<%#Eval("ID") %>'>Create account</a>
            </ItemTemplate>
        </asp:TemplateField>
        
    </Columns>
    <EditRowStyle BackColor="Azure" />
    
    
</asp:GridView>
<asp:LinkButton CssClass="lnkDelete" ID="lnkDelete" runat="server" OnClientClick="return confirm('Are you sure?');" OnClick="lnkDelete_Click">Delete selected items</asp:LinkButton><br />
<div id="paging_bar"><asp:Label ID="lblPaging" runat="server"></asp:Label></div>
<script type="text/javascript" language="javascript">    
	window.location.hash="<%=ActiveAccording %>";
</script>